﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Test.SysConsole.设计模式.SimpleFactory
{
    public class FruitFactory
    {
        public static string GetProduct(string type)
        {
            ISimpleFactory factory = null;
            if (type.Equals("orange"))
            {
                factory = new Orange();
            }
            return factory.Creat();
        }
    }
}
